package com.whz.generic.enhance;

import com.google.common.collect.Maps;
import javassist.Modifier;
import javassist.bytecode.annotation.MemberValue;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.lang.annotation.Annotation;
import java.util.Map;

/**
 * @author whz
 */
@Data
@Builder
@EqualsAndHashCode
public class FieldWrapper {
  private String name;
  private Class<?> type;
  /**
   * field上的注解
   */
  @EqualsAndHashCode.Exclude
  private Class<? extends Annotation> annotation;

  /**
   * 注解中的属性值
   */
  @EqualsAndHashCode.Exclude
  private Map<String, MemberValue> annotationAttributes = Maps.newHashMap();
  /**
   * field的访问级别
   *
   * @see Modifier
   */
  @EqualsAndHashCode.Exclude
  private int modifier;
}